<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增会议')" />
	<th:block th:include="include :: datetimepicker-css" />
	<th:block th:include="include :: bootstrap-fileinput-css" />
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/ueditor.config.js}"></script>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/ueditor.all.js}"> </script>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/lang/zh-cn/zh-cn.js}"></script>
	<link type="text/css" rel="stylesheet" th:href="@{/ueditor/third-party/video-js/video-js.css}"/>
	<script  type="text/javascript" th:src="@{/ueditor/third-party/video-js/video.js}"></script>+
</head>
<body class="white-bg">
<div class="btn-group-sm"  role="group">
	<a class="btn btn-success" onclick="auditRecord()">
		 审核记录
	</a>
	<a class="btn btn-success" onclick="auditPass()">
		 审核通过
	</a>
	<a class="btn btn-success" onclick="auditFail()">
		 审核不通过
	</a>
</div>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-meeting-add" th:object="${men}">
		<input id="id" name="id"  type="hidden" th:field="*{id}" />
		<div class="form-group">
			<label class="col-sm-2 control-label is-required">企业名称：</label>
			<div class="col-sm-6">
				<input id="name" name="name" class="form-control" type="text" th:field="*{name}" required >
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label is-required">统一社会信用代码：</label>
			<div class="col-sm-6">
				<input id="code" name="code" class="form-control" type="text" th:field="*{code}" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label is-required">联系人：</label>
			<div class="col-sm-6">
				<input id="linkName" name="linkName" class="form-control" type="text" th:field="*{linkName}" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label is-required">联系人手机号码：</label>
			<div class="col-sm-6">
				<input id="linkPhone" name="linkPhone" class="form-control" type="text" th:field="*{linkPhone}" required>
			</div>
		</div>
	</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<script type="text/javascript">
	var prefix = ctx + "system/member";
	var pref = ctx + "system/cloumn";

	$("#isShuffling").on("change",function  () {
		var isShuffling = $("input[id='isShuffling']").is(':checked') == true ? 1 : 0;
		if (isShuffling == 0) {
			$("#div2").attr("style", "display:none;");
		} else {
			$("#div2").attr("style", "display:block;");
		}
	})
	$("#datetimepicker-demo-3").datetimepicker({
		format: "yyyy-mm-dd hh:ii:ss",
		autoclose: true,
		todayBtn :true
	});
	$(document).ready(function () {
    $("#imgfiles").fileinput({
        language: 'zh', //设置语言
        'showUpload': true,
        'previewFileType': 'image',
        'showPreview': true,
        'showClose': false,
        allowedFileExtensions: ["png", "jpg", "gif", "bmp", "jpeg"],//接收的文件后缀
        uploadAsync: true, //默认异步上传
        uploadUrl: ctx + "common/upload", //上传的地址
        dropZoneEnabled: false,//是否显示拖拽区域
        autoReplaceBoolean: false,//选择图片时不清空原图片
        maxFileCount: 9,
        initialPreviewAsData: true,
        initialPreview: [$("#imageurl").val()],
        deleteUrl: ""
      });
    });
    var img_urls = "";
    $('#imgfiles').on('fileuploaded', function (event, data, previewId, index) {
        if (typeof (data.response.url) != 'undefined') {
            img_urls = img_urls + data.response.url;
            $("#imageurl").val(img_urls);
        }
    });


	$("#form-notice-add").validate({
		focusCleanup: true
	});

	function saveEnterprise(){
		$.modal.close();
	}

	function auditRecord(){
	    var id = $("#id").val();
	    if (id.length != 0) {
			$.modal.open("审核记录", prefix + "/audit/" + id);
		}else{
			$.modal.alert("无审核记录！");
		}
	}

	function submitHandler() {
			$.modal.close();
		}

    function auditPass(){
        var id = $("#id").val();
    	$.modal.open("审核操作",prefix + "/pass/" + id);
    }

	function auditFail(){
		var id = $("#id").val();
    	$.modal.open("审核操作",prefix + "/fail/" + id);
	}

	var ue = UE.getEditor('editors',{
	});

	$(function(){
		var ue = UE.getEditor('editors')
		ue.addListener("ready", function () {
		});


		$("#datetimepicker-demo-2").datetimepicker({
       		    format: "yyyy-mm-dd hh:ii:ss",
       		    autoclose: true
       		});
	});
</script>
</body>
</html>
